package com.gedi.data.partition;

import org.apache.hadoop.io.IntWritable;
import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Mapper;

import java.io.IOException;

/**
 * @Author:RenPu
 * @Date: 2020/1/19 17:44
 * @Version: 1.0
 * @description:
 */
public class PersonMapper extends Mapper<LongWritable, Text,Text, LongWritable> {


    @Override
    protected void map(LongWritable key, Text value, Context context) throws IOException, InterruptedException {
        String line = value.toString();
        String[] keyWords = line.split(" ");
        context.write(new Text(keyWords[0]),new LongWritable(1L));

    }
}
